import {secklist} from '../../request/api'
const state={
    list:[]
}

const mutations={
    changelist(state,arr){
        state.list=arr
    }
}

const actions={
    reqchangelist(context){
        secklist().then(res=>{
            console.log(res);
            let list=res.data.list?res.data.list:[]
            context.commit('changelist',list)            
        })
    }
}

const getters={
    list(state){
        return state.list
    }
}

export default{
    state,
    mutations,
    actions,
    getters,
    namespaced: true
}